# @Author:      me
# 文件创建日期:    2023-07-05 15:52
# 当前文件:       workspace/string_demo.py
if __name__ == "__main__":
    s = 'abcd'
    a = '012345%s6789'%s

    #1.正序输出
    print(a[::])
    print(a[0:4:])
    print(a[0:4:1])
    #2.倒序输出
    print(a[::-1])
    print(a[8:4:-1])
    #3.默认到头
    print(a[::])
    print(a[6::])
    print(a[:9:])
    print(a[-1::-1])
    #4.倒数输出

    print(a[-6:-1:1])

    print(a[13])


    print(len(a))



